package edu.dayu.proxyTest3;


import edu.dayu.proxyTest2.Invocation;

public class TransactionInterceptor implements Interceptor{
    @Override
    public Object intercept(Invocation invocation) throws Exception {
        System.out.println("------插入前置通知代码-------------");
        Object result = invocation.process();
        System.out.println("------插入后置处理代码-------------");
        return result;
    }

    @Override
    public Object plugin(Object target) {
        return HWInvocationHandler.wrap(target,this);
    }
}
